import { postAction } from '@/api/manage'
import { serviceApi } from '@/api/common.js'

/**
 * 公共API接口
 */
export const api = {
  list: (tenantId) => serviceApi.auth + `/tenants/${tenantId}/projects`,
  delete: (tenantId, projectIds) => serviceApi.auth + `/tenants/${tenantId}/projects/${projectIds}`,
  unrelateList: serviceApi.auth + '/assets/projects/unassigned'
}

/**
 * 添加项目关联
 * @param {*} params
 * @returns
 */
export const addProject = (tenantId, params) => postAction(serviceApi.auth + `/tenants/${tenantId}/projects`, params);
